<!doctype html>
<html class="no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>登陆</title>

	<!-- Set render engine for 360 browser -->
	<meta name="renderer" content="webkit">

	<!-- No Baidu Siteapp-->
	<meta http-equiv="Cache-Control" content="no-siteapp"/>

	<link rel="icon" type="image/png" href="assets/i/favicon.png">

	<!-- Add to homescreen for Chrome on Android -->
	<meta name="mobile-web-app-capable" content="yes">
	<link rel="icon" sizes="192x192" href="__PUBLIC__/assets/i/app-icon72x72@2x.png">

	<!-- Add to homescreen for Safari on iOS -->
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-title" content="Amaze UI"/>
	<link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

	<!-- Tile icon for Win8 (144x144 + tile color) -->
	<meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
	<meta name="msapplication-TileColor" content="#0e90d2">

	<link rel="stylesheet" href="__CSS__/amazeui.min.css">
	<link rel="stylesheet" href="__CSS__/app.css">
	
	<style>
		body{ 
			background-image: url(__IMG__/login_bg.jpg);
			background-repeat:no-repeat;
			background-size: 100% 100%;
		}
		img{
			width:50%;
			margin-top:40px;
		}
		.top{
			padding-top:70px;
		}
		.bg{
			background: url(__IMG__/input.png)  center;
			background-repeat:no-repeat;
			background-size:50%;
			font-size:12px;
			text-indent:10px;
			padding:12px;
		}
		
		input {
			background:transparent;
			outline:none;
			border:0;
			width:50%;
		}
		.sub{
			background:url(__IMG__/ok.png) no-repeat center; 	
			background-size:100%;	 
		}

	</style>
</head>
<body>
	<!--------------------主体部分开始---------------------->
	<header>
		<div style="padding-top:10px;">
			<a href="<{:U('Index/index')}>"><img src="__IMG__/return.png" style="width:15%;margin-left:13px;margin-top: 10px;" /></a>
		</div>
	</header>
	<center>
		<div><img src="__IMG__/cm.png" /></div>
		<div class="top">	
			<form method="post" id="signupForm">	
				<div class="bg"><input type="text" id="name" name="name" placeholder="用户名" /></div>	
				<div class="bg"><input type="password" id="pwd" name="pwd" placeholder="密码" /></div>	
				
				<span id="text"></span>	
				<br/>	 
				<input type="button" value="" name="sub" class="sub" onclick="login()">
			</form>	
		</div>
		<br/>
		<a href="<{:U('Public/register')}>" style="margin-right:90px;float: right;font-size: 12px;">没账号?去注册</a>
	</center>

	<!--------------------主体部分结束---------------------->
	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="__JS__/jquery.min.js"></script>
	<script type="text/javascript" src="__JS__/jquery.validate.js"></script>
	<script type="text/javascript">
		function login(){
			var formData = new FormData($( "#signupForm" )[0]);
			var url2 = "<{:U('Personal/index')}>"
			$.ajax({  
				url: "<{:U('Public/login')}>" ,  
				type: 'POST',  
				data: formData,  
				async: true,  
				cache: false,  
				contentType: false,  
				processData: false,  
				success: function (e) {  
					if(e.status ==1){
						$('#text').empty();
						window.location.href=url2;
					}else{
						$('#text').css({"font-size":"12px","color":"red"}).html("*用户名或者密码错误！");
					}
				},  
				error: function (e) { 

					alert(e.msg);  
				}  
			});  
		}
		$("#name").focus(function(){
			$('#text').empty();
		});
		$("#pwd").focus(function(){
			$('#text').empty();
		});
	</script>
	<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<![endif]-->
</body>
</html>